﻿<UserControl x:Class="ThuPhap.Controls.FontControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    xmlns:font="clr-namespace:ThuPhap.ViewModels"
    d:DataContext="{d:DesignInstance Type=font:FontViewModel,IsDesignTimeCreatable=True}"
    d:DesignHeight="800" d:DesignWidth="480" Width="480" Height="800">

    <Grid x:Name="LayoutRoot" Background="{StaticResource PhoneChromeBrush}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <TextBlock Grid.Row="0" Text="Choose Font" FontSize="40" FontWeight="Bold" Margin="20,0,0,0"/>
        <ListBox Margin="20,0,0,0" Name="FontListBox" Grid.Row="1" ItemsSource="{Binding Items}">
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <StackPanel Height="50" Margin="5,5,5,5" Orientation="Horizontal">
                        <Rectangle Margin="0,15,0,0" VerticalAlignment="Top" Fill="{StaticResource PhoneAccentBrush}" Width="20" Height="20"/>
                        <TextBlock FontSize="30" Margin="10,0,0,0" VerticalAlignment="Top" Text="{Binding FontName}" FontFamily="{Binding FontFamily}"></TextBlock>
                    </StackPanel>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
    </Grid>
</UserControl>
